﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace List
{
    class Program
    {
        static void Main(string[] args)
        {
            int min = int.MaxValue;
            int max = int.MinValue;
            int sum = 0;
            GList<int> list = new GList<int>();
            list.Add(2);
            list.Add(4);
            list.Add(6);
            list.Add(7);
            list.ForEach((m) => { if (m > max) max = m; });
            list.ForEach((m) => { if (m < min) min = m; });
            list.ForEach(m => Console.WriteLine(m));
            list.ForEach(m => sum += m);
            Console.WriteLine($"最大值为：{max}  最小值为:{min}  总和为：{sum}");
        }
    }
}
